package org.sbbs.demo.manager.impl;

import jakarta.annotation.PostConstruct;
import org.sbbs.base.jpa.manager.impl.BaseTreeCacheManagerImpl;
import org.sbbs.demo.dao.DemoTreeRepo;
import org.sbbs.demo.entity.DemoTree;
import org.sbbs.demo.manager.DemoTreeCacheManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

/**
 *
 * @author jenkins
 */
@Service
@Qualifier("demoTreeCacheManager")
public class DemoTreeCacheManagerImpl extends BaseTreeCacheManagerImpl<DemoTree, Long, DemoTreeRepo> implements DemoTreeCacheManager {

    @Autowired
    private DemoTreeRepo baseTreeRepo;

    @PostConstruct
    public void init() {
        super.setRepo(baseTreeRepo);
        this.setCache(this.getCacheManager().getCache("DemoTreeCache"));
        this.getCache().clear();
        this.load(true);
    }

//    @Override
//    public Page<DemoTree> findAllIds(Pageable pageable) {
//        return this.demoBeanRepository.findAllIds(pageable); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/OverriddenMethodBody
//
//    }
}
